Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@servicensw/base

Package Overview
Dependencies
Maintainers
0
Versions
186
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@servicensw/base

Base styles and variables

  • 3.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.3K
increased by20.28%
Maintainers
0
Weekly downloads
 
Created
Source

@servicensw/base

Base CSS for all of Service NSW.

Service NSW package documentation and examples
(Login credentials required)

Installation

npm install @servicensw/base --save-dev

How to use

CSS

Importantly, the dist CSS from this package includes all of the CSS variables for all other components.

  • PostCSS workflow: @import '@servicensw/base';
  • Sass/Eyeglass: @import 'servicensw-base';
  • Native CSS: @import url('dist/base.css');
  • Link tag: <link href="dist/base.css" rel="stylesheet" type="text/css">

Vanilla JS

The recommended usage is of ES modules, to take advantage of code-splitting.

import Base from "@servicensw/base"

new Base({
  idAttributeSelectors:
    ":not(.notice) > h2:not(.accordion__title), h3:not(.accordion__title)",
  responsiveTableSelectors:
    ".table--responsive:not(.is-excluded), .page-section table:not(.is-excluded):not(.table--responsive)",
  videoTranscriptSelectors: ".transcript:not(.is-excluded)",
  makeGlobal: true,
})

The utilities can also be used independently;

import { Keyboard } from "@servicensw/base"

Legacy usage;

  • IIFE: <script src="dist/base.js" type="text/javascript"></script>
  • Common JS: const Base = require("@servicensw/base") (initialize yourself)

This package includes a variety of JS functionality. This functionality can be access by including dist/base.js via a script tag, or it can be imported using ES module syntax. See src/base.js for examples.

Change log

FAQs

Package last updated on 09 Sep 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc